<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      >
<ui:composition template="/template/template.xhtml">
<ui:define name="content">
	<f:view>
		<h:form>
		<div style="width: 600px; height: 100%; margin-left: auto;margin-right: auto; margin-top: 100px">
			<h:messages />
			<h:outputText value="NEW PRODUCT" />
			<h:panelGrid columns="2" style="text-align : center" width="100%"> 
				<h:outputLabel for="code" value="code" />
				<h:inputText id="code" value="#{productBean.code}" />
				<h:outputLabel for="name" value="name" />
				<h:inputText id="name" value="#{productBean.name}" />
				<h:outputLabel for="description" value="description" />
				<h:inputText id="description" value="#{productBean.description}" />
				<h:outputLabel for="price" value="price" />
				<h:inputText id="price" value="#{productBean.price}" />

				<h:commandButton  action="#{productBean.create}" value="submit"/>
				<h:commandButton  action="succes" value="cancel"/>
			</h:panelGrid>
		</div>
		</h:form>
	</f:view>
</ui:define>
</ui:composition>
</html>
